package com.feng.Point03;

/**
 * Created by FengBin on 2022/3/22 20:55
 * 静态工厂方法
 */
public class SingletonClass02 {
    //私有静态成员变量，指定为final
    private static final SingletonClass02 singleton = new SingletonClass02();
    //私有构造器
    private SingletonClass02() {}
    //定义一个工厂方法返回
    public static SingletonClass02 factory() {
        return singleton;
    }
}
